From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:46 2006 Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:47 2006 Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:06 2006 Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen@lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:06 2006 Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I suspect the install prcoess Dmitry has usually creates the > directory. I > do not have a Mac here so it would be wise to wait for his answer in a > few > hours. > > The directory is what is listed in the source as the lock directory for > Mac. I don't want to blindly suggest changes to your system though. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From Bob_Jacobsen at lbl.gov Wed Oct 22 06:26:03 2003 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 22 Oct 2003 05:26:03 -0700 Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: I use Rxtx for JMRI on MacOS X. It routinely lists multiple versions of a single port, e.g. a port on a Belkin USB adapter will be listed as USA28X181P2.2 /dev/tty.USA28X181P2.2 /dev/cu.USA28X181P2.2 Either of the later two will open OK, but the first one will issue an error message to the console: *** malloc[2595]: error for object 0x45af590: Object already freed being freed then throw an exception: java.lang.UnsatisfiedLinkError: native_psmisc_report_owner at javax.comm.CommPortIdentifier.native_psmisc_report_owner(Native Method) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:344) Incidentally, IRDA-equiped Macs do a similar things, showing three ports for the (one channel) IRDA hardware: IrDA-IrCOMMch-b /dev/tty.IrDA-IrCOMMch-b /dev/cu.IrDA-IrCOMMch-b Again, the latter two work fine, but the first returns an error. I've never attempted to debug about the errors, just bypassed them in the user setup instructions. Bob -- -------------- Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957) Am likely to be behind for next week or so. If it's urgent, please call! From p_narayanamurthy at yahoo.com Wed Oct 22 23:34:32 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 22:34:32 -0700 (PDT) Subject: [Rxtx] hi this is the command which i have been asked to use Message-ID: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Messages given by.....Trent Jarvi Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. And Actually....I have installed the driver pl-2303...from the following site.... http://www.sc-systems.com/products/adaptors/usb_serial.htm i couldn't install this rxtx...so i have done manually.. 1.copying rxtxcomm.jar to /extensions folder 2.libserial.jnilib to /extensions folder after this i have written some code to list serial ports... so it is listed....two ports if i am not connected usb serial port adapter to the system /dev/tty.irda /dev/cu.irda if i am connected the usb serial port adapter it listed four ports /dev/tty.irda /dev/cu.irda /dev/tty.usbserial0 /dev/cu.usbserial0 but when i tried to open either of this four ports... i am getting an portinuse exception.... the code which i have used posted in the previous ports please help me in this regard... Many thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Wed Oct 22 23:45:34 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Thu, 23 Oct 2003 07:45:34 +0200 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: <1F41C5D1-051C-11D8-A13E-000393719396@gmx.de> Hi, start by checking if your lock-files-directory exists. Like Trent described in his previous answer. > Messages given by.....Trent Jarvi > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. if it does not exist your're supposed to create that directory manually. mkdir /var/spool/uucp chmod ugo+rwx /var/spool/uucp You have to be root in order to do so. (Are those access rights OK ?) Greetings moritz From p_narayanamurthy at yahoo.com Thu Oct 23 01:28:02 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:28:02 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023072802.68018.qmail@web40901.mail.yahoo.com> yes I have created testinglockfiles in /var/spool/uucp directory... what i have to do next... narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Thu Oct 23 01:38:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 08:38:09 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023072802.68018.qmail@web40901.mail.yahoo.com> References: <20031023072802.68018.qmail@web40901.mail.yahoo.com> Message-ID: On Thu, 23 Oct 2003, pedapudi narayana murthy wrote: > yes > I have created testinglockfiles in /var/spool/uucp > directory... > If you have a /var/spool/uucp directory, lockfiles should be possible now. It should be possible for root to open the device. A user (not root) would need to be in the proper group. Dmitry's install setup does this setup automatically. It would be advisable to use his install. The testinglockfiles file may be removed. Creating the uucp directory may interfere with future attempts to use dmitry's install. I don't know. If you have problems with the install dmitry has, I'd recommend working that out rather than reinventing the wheel. From p_narayanamurthy at yahoo.com Thu Oct 23 01:54:52 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 00:54:52 -0700 (PDT) Subject: [Rxtx] yaa i have created testinglockfiles Message-ID: <20031023075452.64827.qmail@web40902.mail.yahoo.com> If i try to install after creating the uucp directory as per the instructions.....i am trying to install the RXTX.pre_install .... But it is stucking up after approximately 2% is done...May i Know why this is happening.. narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 02:19:10 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:19:10 -0400 Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <20031023075452.64827.qmail@web40902.mail.yahoo.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> Message-ID: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > But it is stucking up after approximately 2% is > done...May i Know why this is happening.. > narayana > because you use old installer you can download Jaguar/Panther installer from cvs Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 02:21:04 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 09:21:04 +0100 (BST) Subject: [Rxtx] yaa i have created testinglockfiles In-Reply-To: <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> References: <20031023075452.64827.qmail@web40902.mail.yahoo.com> <93E6C7AC-0531-11D8-BFCF-000393DC71BC@mac.com> Message-ID: On Thu, 23 Oct 2003, Dmitry Markman wrote: > > On Oct 23, 2003, at 3:54 AM, pedapudi narayana murthy wrote: > > > But it is stucking up after approximately 2% is > > done...May i Know why this is happening.. > > narayana > > > > because you use old installer > you can download Jaguar/Panther installer from cvs > I think this will have the proper installer: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz It contains the material from CVS last Thursday. From dmarkman at mac.com Thu Oct 23 02:42:47 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 04:42:47 -0400 Subject: [Rxtx] hi this is the command which i have been asked to use In-Reply-To: <20031023053432.86584.qmail@web40906.mail.yahoo.com> References: <20031023053432.86584.qmail@web40906.mail.yahoo.com> Message-ID: check your installation: 1, you have to have /var/spool/uucp folder with 775 (rwxrwxr-x) permission 2. folder /Library/Java/Extensions should contain RXTXcomm.jar librxtxSerial.jnilib (not libserial.jnilib it's very old library ) files I don't know what is /extensions folder it's not known folder for Apple's JVM unless you setup it explicitly I'd not recommend to create any custom folders in / directory don't touch / really, it's not for you :-( 3. from terminal run groups or id -Gn command you should see uucp group there On Oct 23, 2003, at 1:34 AM, pedapudi narayana murthy wrote: > Messages given by.....Trent Jarvi > > > Is the port being used by another application? > Perhaps another copy of > the one you are working on? > > rxtx will try to create a lock file in > /var/spool/uucp. You can look > in > that directory to see if there is already a lock file > there. You can > also > make sure you are able to create a lock file in that > directory in a > shell: > > > touch /var/spool/uucp/testinglockfiles && rm -f > /var/spool/uucp/testinglockfiles > > > If the lock fails, you will recieve the message > mentioned. > > > > And Actually....I have installed the driver > pl-2303...from the following site.... > > http://www.sc-systems.com/products/adaptors/usb_serial.htm > > i couldn't install this rxtx...so i have done > manually.. > 1.copying rxtxcomm.jar to /extensions folder > 2.libserial.jnilib to /extensions folder > > > after this i have written some code to list serial > ports... > > so it is listed....two ports if i am not connected usb > serial port adapter to the system > /dev/tty.irda > /dev/cu.irda > > if i am connected the usb serial port adapter it > listed four ports > /dev/tty.irda > /dev/cu.irda > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > > but when i tried to open either of this four ports... > i am getting an portinuse exception.... > > the code which i have used posted in the previous > ports > > > please help me in this regard... > > > Many thanks > narayana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Thu Oct 23 03:04:31 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:04:31 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023090431.28827.qmail@web40908.mail.yahoo.com> I have downloaded from the link given by you ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz i took the mac compatible file to install that is.... MACOSX_IDE/forPackageMaker/rxtx.pkg is this the correct one i am using... when i am trying to install this i am getting stucked at approximately 2%... i don't know why this is happening.. can u please explain me... Many Thanks Naryana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Thu Oct 23 03:16:23 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 23 Oct 2003 05:16:23 -0400 Subject: [Rxtx] still it is not able to installl In-Reply-To: <20031023090431.28827.qmail@web40908.mail.yahoo.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> Message-ID: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> I tried RXTX_Jag installer from rxtx-2.1-7pre17.tar.gz and I didn't see any problem with that can you see some console messages related to installation? On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > I have downloaded from the link given by you > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > i took the mac compatible file to install that is.... > MACOSX_IDE/forPackageMaker/rxtx.pkg > > is this the correct one i am using... > > when i am trying to install this i am getting stucked > at approximately 2%... > i don't know why this is happening.. > can u please explain me... > > Many Thanks > > > Naryana > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From taj at linuxgrrls.org Thu Oct 23 03:20:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 10:20:25 +0100 (BST) Subject: [Rxtx] still it is not able to installl In-Reply-To: <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com> <923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: Unless by some odd chance someone hit a cache someplace, I only see one download of 2.1-7pre17 bash-2.05b$ grep pre17 /var/log/xferlog Thu Oct 23 03:00:14 2003 40 XXX.XXX.216.188 985729 /var/ftp/pub/rxtx/rxtx-2.1-7pre17.tar.gz b _ o a macexplorer@ ftp 0 * c bash-2.05b$ On Thu, 23 Oct 2003, Dmitry Markman wrote: > I tried RXTX_Jag > installer from rxtx-2.1-7pre17.tar.gz > > and I didn't see any problem with that > > can you see some console messages related to installation? > > > > On Oct 23, 2003, at 5:04 AM, pedapudi narayana murthy wrote: > > > I have downloaded from the link given by you > > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > > > > i took the mac compatible file to install that is.... > > MACOSX_IDE/forPackageMaker/rxtx.pkg > > > > is this the correct one i am using... > > > > when i am trying to install this i am getting stucked > > at approximately 2%... > > i don't know why this is happening.. > > can u please explain me... > > > > Many Thanks > > > > > > Naryana > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Thu Oct 23 03:51:18 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 02:51:18 -0700 (PDT) Subject: [Rxtx] still it is not able to installl Message-ID: <20031023095118.48736.qmail@web40903.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Thu Oct 23 05:31:17 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Thu, 23 Oct 2003 04:31:17 -0700 (PDT) Subject: [Rxtx] now i am happy ....since i could open the port Message-ID: <20031023113117.72077.qmail@web40912.mail.yahoo.com> Hi Many Many Thanks When I installed this RXTX_Jag It is working great now i am able to open the port.... I am very thankful to u... Till now i was trying to install...rxtx.pkg...and i couldn't Further if i have any problems i will contact u.. And once again Thanks narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From skejariwal at perigee.com Thu Oct 23 08:08:29 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:08:29 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> Message-ID: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Hi, Following is not an issue but just curious to know why it is happening. I am using the Single Board Computer to talk to the Microcontroller unit through serial ports. The DTR pin on the SBC is hacked to recycle the power on the MCU. Now when the communication is initiated through KERMIT (hoping few ppl on this grp are familiar), the DTR pin goes high(1) which resets the MCU and communication fails. Now when the communication terminates, the DTR is turned off (0) which turns back the MCU on. This DTR handshaking is happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or flowcontrol. As a result, no communication ever takes place. But if I use the RXTX, then everything works fine. I see no issues. The guys on Kermit forum hinted that it has to do with low-level system calls or device drivers. But then how come RXTX is working fine with DTR pin been not flipped during communication initiation and termination. Thanks Ray. From skejariwal at perigee.com Thu Oct 23 08:12:06 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 10:12:06 -0400 Subject: [Rxtx] Fw: DTR handshaking.. Message-ID: <007b01c3996f$a6e5e650$4f00a8c0@Perigee.Perigeellc.com> Sorry for reposting. Wasn't sure if first one went through. ----- Original Message ----- From: "Shreyas Kejariwal" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 10:08 AM Subject: DTR handshaking.. > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > > Thanks > Ray. > > > > From taj at linuxgrrls.org Thu Oct 23 12:46:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 19:46:07 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com> <002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Hi, > > Following is not an issue but just curious to know why it is happening. > > I am using the Single Board Computer to talk to the Microcontroller unit > through serial ports. The DTR pin on the SBC is hacked to recycle the power > on the MCU. Now when the communication is initiated through KERMIT (hoping > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > MCU and communication fails. Now when the communication terminates, the DTR > is turned off (0) which turns back the MCU on. This DTR handshaking is > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > flowcontrol. As a result, no communication ever takes place. > > But if I use the RXTX, then everything works fine. I see no issues. > > The guys on Kermit forum hinted that it has to do with low-level system > calls or device drivers. But then how come RXTX is working fine with DTR pin > been not flipped during communication initiation and termination. > You didn't specify which OS this is happening with. If this is Unix, one could dump the termios data structures with rxtx and kermit. In SerialImp.c there is a dump_termios() function which can be called for debugging. The good old setserial program can be used to explore the port. There must be a difference and the way I'd find it is by dumping the port setting with the above tools or inside the kernel driver. The difference could turn out to be an RXTX bug. Just because it works does not mean its right :). If this is on w32, then one would have to drop into termios.c and start dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides to make w32 look like Unix for this type of issue. From skejariwal at perigee.com Thu Oct 23 13:03:43 2003 From: skejariwal at perigee.com (Shreyas Kejariwal) Date: Thu, 23 Oct 2003 15:03:43 -0400 Subject: [Rxtx] DTR handshaking.. References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Never mind. Everytime the serial port is opened the DTR pin is turned high by the serial port driver and turned low when the serial port is closed. It happened while using RXTX as well. It did not become an issue since the DTR pin was controlled from within our java app which I was unaware at the time of writing my last mail. Thanks for the response. Ray BTW, the OS is linux. ----- Original Message ----- From: "Trent Jarvi" To: "Java RXTX discussion" Sent: Thursday, October 23, 2003 2:46 PM Subject: Re: [Rxtx] DTR handshaking.. > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > Hi, > > > > Following is not an issue but just curious to know why it is happening. > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > through serial ports. The DTR pin on the SBC is hacked to recycle the power > > on the MCU. Now when the communication is initiated through KERMIT (hoping > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets the > > MCU and communication fails. Now when the communication terminates, the DTR > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking or > > flowcontrol. As a result, no communication ever takes place. > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > The guys on Kermit forum hinted that it has to do with low-level system > > calls or device drivers. But then how come RXTX is working fine with DTR pin > > been not flipped during communication initiation and termination. > > > > You didn't specify which OS this is happening with. > > If this is Unix, one could dump the termios data structures with rxtx and > kermit. > > In SerialImp.c there is a dump_termios() function which can be called for > debugging. The good old setserial program can be used to explore the > port. > > There must be a difference and the way I'd find it is by dumping the port > setting with the above tools or inside the kernel driver. > > The difference could turn out to be an RXTX bug. Just because it works > does not mean its right :). > > If this is on w32, then one would have to drop into termios.c and start > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > to make w32 look like Unix for this type of issue. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Oct 23 13:23:02 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 23 Oct 2003 20:23:02 +0100 (BST) Subject: [Rxtx] DTR handshaking.. In-Reply-To: <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> References: <20031023090431.28827.qmail@web40908.mail.yahoo.com><923A8A5C-0539-11D8-BFCF-000393DC71BC@mac.com><002901c3996f$25759bb0$4f00a8c0@Perigee.Perigeellc.com> <00cc01c39998$63d83ba0$4f00a8c0@Perigee.Perigeellc.com> Message-ID: On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > Never mind. Everytime the serial port is opened the DTR pin is turned high > by the serial port driver and turned low when the serial port is closed. It > happened while using RXTX as well. It did not become an issue since the DTR > pin was controlled from within our java app which I was unaware at the time > of writing my last mail. > I'll just add this since we have a searchable archive now. It may help someone. In RXTX 2.1 there is some code for 'preopened' ports which could prevent raising and dropping of the control lines on open/close. This is not documented and hidden with some other 'extensions to CommAPI.' These extensions are not recommended but are there for those looking for things not specified by CommAPI. > > > ----- Original Message ----- > From: "Trent Jarvi" > To: "Java RXTX discussion" > Sent: Thursday, October 23, 2003 2:46 PM > Subject: Re: [Rxtx] DTR handshaking.. > > > > > > > > On Thu, 23 Oct 2003, Shreyas Kejariwal wrote: > > > > > Hi, > > > > > > Following is not an issue but just curious to know why it is happening. > > > > > > I am using the Single Board Computer to talk to the Microcontroller unit > > > through serial ports. The DTR pin on the SBC is hacked to recycle the > power > > > on the MCU. Now when the communication is initiated through KERMIT > (hoping > > > few ppl on this grp are familiar), the DTR pin goes high(1) which resets > the > > > MCU and communication fails. Now when the communication terminates, the > DTR > > > is turned off (0) which turns back the MCU on. This DTR handshaking is > > > happening even if I specify to use the Xon/Xoff or RTS/CTS handshaking > or > > > flowcontrol. As a result, no communication ever takes place. > > > > > > But if I use the RXTX, then everything works fine. I see no issues. > > > > > > The guys on Kermit forum hinted that it has to do with low-level system > > > calls or device drivers. But then how come RXTX is working fine with DTR > pin > > > been not flipped during communication initiation and termination. > > > > > > > You didn't specify which OS this is happening with. > > > > If this is Unix, one could dump the termios data structures with rxtx and > > kermit. > > > > In SerialImp.c there is a dump_termios() function which can be called for > > debugging. The good old setserial program can be used to explore the > > port. > > > > There must be a difference and the way I'd find it is by dumping the port > > setting with the above tools or inside the kernel driver. > > > > The difference could turn out to be an RXTX bug. Just because it works > > does not mean its right :). > > > > If this is on w32, then one would have to drop into termios.c and start > > dumping the w32 data structs. I wouldnt trust the Unix API RXTX provides > > to make w32 look like Unix for this type of issue. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Mon Oct 20 18:25:16 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Mon, 20 Oct 2003 20:25:16 -0400 Subject: [Rxtx] hi In-Reply-To: <20031020033847.86248.qmail@web40906.mail.yahoo.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> Message-ID: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> do you really want to communicate to your device through the infra-red port? I don't think MAC OS X has a good IRDA support, maybe I'm wrong I'm not sure about RXTX support of the IRDA Dmitry Markman On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > Hi, > i am trying to do port communication on mac... > when i am detecting the ports (USB on MAC os 10.x > later version)..... > there are two ports deisplayed respectively > /dev/tty.irda > /dev/cu.irda > > when i am trying to open these ports it is returning > null and portinuseexception is throwed.... > that to it is giving a message like this.. > > portinuseexception by an unkownapplication... > > let me know the details.... > please help me in this regards. > bye > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > From taj at linuxgrrls.org Mon Oct 20 18:32:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 01:32:17 +0100 (BST) Subject: [Rxtx] hi In-Reply-To: <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> References: <20031020033847.86248.qmail@web40906.mail.yahoo.com> <0B4DB1A4-035D-11D8-BBD9-000393DC71BC@mac.com> Message-ID: On Mon, 20 Oct 2003, Dmitry Markman wrote: > do you really want to communicate to your device through the infra-red > port? > > I don't think MAC OS X has a good IRDA support, maybe I'm wrong > I'm not sure about RXTX support of the IRDA > It should be able to work. There may need to be some conditional code added to SerialImp.c::configure_port(). It looks like there is a tty interface provided for the kernel but perhaps one or more of the calls fail and need to be handled for IRDA. In that case, enumeration and opening the port would fail by default currently. > On Oct 19, 2003, at 11:38 PM, pedapudi narayana murthy wrote: > > > Hi, > > i am trying to do port communication on mac... > > when i am detecting the ports (USB on MAC os 10.x > > later version)..... > > there are two ports deisplayed respectively > > /dev/tty.irda > > /dev/cu.irda > > > > when i am trying to open these ports it is returning > > null and portinuseexception is throwed.... > > that to it is giving a message like this.. > > > > portinuseexception by an unkownapplication... > > > > let me know the details.... > > please help me in this regards. > > bye > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From p_narayanamurthy at yahoo.com Tue Oct 21 00:36:49 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:36:49 -0700 (PDT) Subject: [Rxtx] thanks for the reply Message-ID: <20031021063649.63883.qmail@web40906.mail.yahoo.com> Hi Thanks for the reply... let me know few details..... 1) are /dev/tty.irda and /dev/cu.irda these both are not (USB Ports or serial ports) ports? Why i am asking this question is u used a word infrared ports.... please let me know....what are the possible (USB or Serial Ports on MAC)... and how can i do serial port communication on MAC. i am using USB Serial port adapter.... I am very much need of this...... please let me know... Thanks and Regards Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From p_narayanamurthy at yahoo.com Tue Oct 21 00:49:21 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Mon, 20 Oct 2003 23:49:21 -0700 (PDT) Subject: [Rxtx] What are the serial ports on MAC Message-ID: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Hi I am using USB serial port adapter ... this is the code i have written import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getPortType() == CommPortIdentifier.PORT_SERIAL ) { if ( portId.getName().equals( "/dev/tty.irda" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } } }catch(Throwable t){} } When i use this code it is detecting only two ports and they are /dev/tty.irda and /dev/cu.irda this ports are serial ports or not...i am not able to understand....and when i am trying to connect these ports by the above code....so it is giving portinuseexception..... Many Thanks Narayana Murthy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Tue Oct 21 00:59:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 21 Oct 2003 07:59:14 +0100 (BST) Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: <20031021064921.16207.qmail@web40911.mail.yahoo.com> References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: On Mon, 20 Oct 2003, pedapudi narayana murthy wrote: > Hi > I am using USB serial port adapter ... > this is the code i have written > > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > if ( portId.getPortType() == > CommPortIdentifier.PORT_SERIAL ) > { > if ( portId.getName().equals( "/dev/tty.irda" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > } > } > } > }catch(Throwable t){} > } > > When i use this code it is detecting only two ports > and they are > > /dev/tty.irda > and > /dev/cu.irda > > this ports are serial ports or not...i am not able to > understand....and when i am trying to connect these > ports by the above code....so it is giving > portinuseexception..... > > IrDA is Infrared Data Association I'm guessing thats not what you want from the description. rxtx currently supports the following devices on Mac OS X: else if(osName.equals("Mac OS X")) { String[] Temp = { // Keyspan USA-28X adapter, USB port 1 "cu.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 1 "tty.KeyUSA28X191.", // Keyspan USA-28X adapter, USB port 2 "cu.KeyUSA28X181.", // Keyspan USA-28X adapter, USB port 2 "tty.KeyUSA28X181.", // Keyspan USA-19 adapter "cu.KeyUSA19181.", // Keyspan USA-19 adapter "tty.KeyUSA19181." }; Dmitry will be more familiar with Mac OS X but if you are trying to plug something into your computer it is probably not going to be IrDA. From p_narayanamurthy at yahoo.com Tue Oct 21 04:39:14 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 03:39:14 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021103914.62203.qmail@web40911.mail.yahoo.com> hi How can we know that the USB adapter is installed properly and how can we know what are the USB ports available in that MAC machine......is there any command to see them... and can i have a piece of code to open a port on MAC... Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From moritz.gmelin at gmx.de Tue Oct 21 05:11:42 2003 From: moritz.gmelin at gmx.de (Moritz Gmelin) Date: Tue, 21 Oct 2003 13:11:42 +0200 Subject: [Rxtx] hi In-Reply-To: <20031021103914.62203.qmail@web40911.mail.yahoo.com> References: <20031021103914.62203.qmail@web40911.mail.yahoo.com> Message-ID: <595E4196-03B7-11D8-A13E-000393719396@gmx.de> Hi, I have a usb-serial adapter which shows up as /dev/tty.usbserial-FTAQ3QX8. But that depends on the model. But of course you need to install a driver first. I got mine from http://www.ftdichip.com/ for the keyspan adapter, there is a driver at http://www.keyspan.com/products/usb/usa28x/ Once installed you should see your /dev/tty.usbserial**** device and be able to connect to it with rxtx. I got one more problem (port in use exception) because I did not have the /var/spool/uucp directory on my systems (also check for read-write access to that directory) where rxtx stores the lock file. Greetings Moritz Am 21.10.2003 um 12:39 schrieb pedapudi narayana murthy: > hi > How can we know that the USB adapter is installed > properly > and how can we know what are the USB ports available > in that MAC machine......is there any command to see > them... > and can i have a piece of code to open a port on > MAC... > > > Many Thanks > > > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From dmarkman at mac.com Tue Oct 21 06:47:25 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 08:47:25 -0400 Subject: [Rxtx] What are the serial ports on MAC In-Reply-To: References: <20031021064921.16207.qmail@web40911.mail.yahoo.com> Message-ID: mac os x code doesn't use predefine list of the ports: it discovers it on the fly with IOKit API: kern_return_t createSerialIterator(io_iterator_t *serialIterator) { kern_return_t kernResult; mach_port_t masterPort; CFMutableDictionaryRef classesToMatch; if ((kernResult=IOMasterPort(NULL, &masterPort)) != KERN_SUCCESS) { printf( "IOMasterPort returned %d\n", kernResult); return kernResult; } if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } return kernResult; } you filter devices from kIOSerialBSDServiceValue class by selector kIOSerialBSDAllTypes so you you will get all serial devices irda, modems included in initial rxtx implementation I was more specific and filtered devices by kIOSerialBSDRS232Type in that case you wouldn't get irda device at all amyway you definitely have to install driver for your adapter and plug that adapter into the computer, driver (if was properly installed) will discover your device immediately and you will be able to see it in /dev directory: devices like > cu.KeyUSA28X191 etc look for exact format of device name in the driver documentation On Oct 21, 2003, at 2:59 AM, Trent Jarvi wrote: > else if(osName.equals("Mac OS X")) > { > String[] Temp = { > // Keyspan USA-28X adapter, USB port 1 > "cu.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 1 > "tty.KeyUSA28X191.", > // Keyspan USA-28X adapter, USB port 2 > "cu.KeyUSA28X181.", > // Keyspan USA-28X adapter, USB port 2 > "tty.KeyUSA28X181.", > // Keyspan USA-19 adapter > "cu.KeyUSA19181.", > // Keyspan USA-19 adapter > "tty.KeyUSA19181." > }; > Dmitry Markman From p_narayanamurthy at yahoo.com Tue Oct 21 07:05:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Tue, 21 Oct 2003 06:05:39 -0700 (PDT) Subject: [Rxtx] hi Message-ID: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Hi I Have installed the driver from www.kesyspan.com But after installation if is the result by typing the command ls /dev* i am not able to see the USB ports... can u help me in these regards... Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From dmarkman at mac.com Tue Oct 21 07:27:58 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 21 Oct 2003 09:27:58 -0400 Subject: [Rxtx] hi In-Reply-To: <20031021130539.94671.qmail@web40911.mail.yahoo.com> References: <20031021130539.94671.qmail@web40911.mail.yahoo.com> Message-ID: <6303A33C-03CA-11D8-BFCF-000393DC71BC@mac.com> did you connect your adapter (even without to connecting to real device) On Oct 21, 2003, at 9:05 AM, pedapudi narayana murthy wrote: > Hi > I Have installed the driver from www.kesyspan.com > But after installation if is the result by typing the > command ls /dev* > i am not able to see the USB ports... > can u help me in these regards... > Thanks > Narayana > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From p_narayanamurthy at yahoo.com Wed Oct 22 01:01:39 2003 From: p_narayanamurthy at yahoo.com (pedapudi narayana murthy) Date: Wed, 22 Oct 2003 00:01:39 -0700 (PDT) Subject: [Rxtx] i have two serial ports on MAC not able to open them Message-ID: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Hi I have detected to Seril ports on My MAC machine i am not able to open them .....can u please help me in this regards or else is there any mistake in my program please take a look import gnu.io.*; import gnu.io.CommPortIdentifier; //RXTX 2.1.X public class MacCommunication { SerialPort port=null; public MacCommunication() { scanPorts(); } public static void main(String args[]) { new MacCommunication(); } public void scanPorts() { try { int index = 0; for(java.util.Enumeration en = CommPortIdentifier.getPortIdentifiers(); en.hasMoreElements() { CommPortIdentifier portId = (CommPortIdentifier)en.nextElement(); if(portId == null) continue; if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { String name = portId.getName(); System.out.println("Name "+name); //add that name to the vector if you wish if ( portId.getName().equals( "/dev/tty.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } if ( portId.getName().equals( "/dev/cu.usbserial0" ) ) { try { port = (SerialPort) portId.open("MacCommunication", 2000); System.out.println("Open"); } catch (PortInUseException e) {} break; } } } }catch(Throwable t){} } Please tell me why i am not able to open.... When i am trying to open i am getting a null....returned...what could be the reason for this Many Thanks Narayana __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From taj at linuxgrrls.org Wed Oct 22 01:16:18 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 08:16:18 +0100 (BST) Subject: [Rxtx] i have two serial ports on MAC not able to open them In-Reply-To: <20031022070139.38251.qmail@web40908.mail.yahoo.com> References: <20031022070139.38251.qmail@web40908.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > Hi > I have detected to Seril ports on My MAC machine i am > not able to open them .....can u please help me in > this regards or else is there any mistake in my > program > please take a look > > import gnu.io.*; > import gnu.io.CommPortIdentifier; //RXTX 2.1.X > public class MacCommunication > { > > SerialPort port=null; > public MacCommunication() > { > scanPorts(); > } > > public static void main(String args[]) > { > new MacCommunication(); > } > public void scanPorts() > { > try > { > int index = 0; > for(java.util.Enumeration en = > CommPortIdentifier.getPortIdentifiers(); > en.hasMoreElements() > { > CommPortIdentifier portId = > (CommPortIdentifier)en.nextElement(); > if(portId == null) continue; > if(portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) > { > String name = portId.getName(); > System.out.println("Name "+name); > //add that name to the vector if you wish > > if ( portId.getName().equals( > "/dev/tty.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > if ( portId.getName().equals( "/dev/cu.usbserial0" ) > ) > { > try > { > port = (SerialPort) > portId.open("MacCommunication", 2000); > System.out.println("Open"); > } > catch (PortInUseException e) > {} > break; > } > > } > } > }catch(Throwable t){} > } > > > Please tell me why i am not able to open.... > When i am trying to open i am getting a > null....returned...what could be the reason for this > > What port names are listed in your program? I see you try to print them out. While using try/catch, try to print out what the exception message is in the catch scope. try { foo(); } catch ( Exception e ) { System.out.println(e.getMessage()); e.printStackTrace(); System.out.println(e.toString()); ... } From taj at linuxgrrls.org Wed Oct 22 02:02:53 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:02:53 +0100 (BST) Subject: [Rxtx] Re: the two ports and exception is (fwd) Message-ID: ---------- Forwarded message ---------- Date: Wed, 22 Oct 2003 08:43:34 +0100 (BST) From: Trent Jarvi To: pedapudi narayana murthy Subject: Re: the two ports and exception is On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > it is detecting four ports > > /dev/tty.irda > /dev/cu.irda > > /dev/tty.usbserial0 > /dev/cu.usbserial0 > > > since i have given equls condition it will be > connected only when the last two ports are matched.. > > the exception is > portinuse exception > Is the port being used by another application? Perhaps another copy of the one you are working on? rxtx will try to create a lock file in /var/spool/uucp. You can look in that directory to see if there is already a lock file there. You can also make sure you are able to create a lock file in that directory in a shell: touch /var/spool/uucp/testinglockfiles && rm -f /var/spool/uucp/testinglockfiles If the lock fails, you will recieve the message mentioned. From taj at linuxgrrls.org Wed Oct 22 02:05:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 22 Oct 2003 09:05:57 +0100 (BST) Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: <20031022080219.10711.qmail@web40905.mail.yahoo.com> References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > i have given the command which u have given... > But it say's there is no such file or directory... > > I suspect the install prcoess Dmitry has usually creates the directory. I do not have a Mac here so it would be wise to wait for his answer in a few hours. The directory is what is listed in the source as the lock directory for Mac. I don't want to blindly suggest changes to your system though. From dmarkman at mac.com Wed Oct 22 05:09:21 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 22 Oct 2003 07:09:21 -0400 Subject: [Rxtx] Re: it say's no such file or directory In-Reply-To: References: <20031022080219.10711.qmail@web40905.mail.yahoo.com> Message-ID: <2FB8C91B-0480-11D8-BFCF-000393DC71BC@mac.com> I didn't get few messages what command? could you tell what kind of exception if any you can see while your program is running? did you run rxtx installer? could you sen result of the command ls /dev? after installer keyspan driver? On Oct 22, 2003, at 4:05 AM, Trent Jarvi wrote: > > > On Wed, 22 Oct 2003, pedapudi narayana murthy wrote: > >> i have given the command which u have given... >> But it say's there is no such file or directory... >> >> > > I su