RE: Serial port using USB adaptor

2008-03-04 Thread Stepp, Charles
Yeah. RS232C can operate in many different ways, using the various "wires" 
differently. Opening a serial port is just the beginning of the work; then 
there is deciding what signals and handshake to use. Ohthe good ol' days.

Charles Stepp
Meskimen's Law:
There's never time to do it rite, but there's always time to do it over.

-Original Message-
From: Samuel Thibault [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 01, 2008 5:05 AM
To: cygwin@cygwin.com
Subject: Re: Serial port using USB adaptor

hce, le Sat 01 Mar 2008 20:20:21 +1100, a écrit :
> One more thing, if a serial port is not connected by a serial cable,
> it can still open a serila port without errors. That was very stange
> to everybody when a problem printed out "Open Serial Port /dev/com1
> success", but actually there was no cable connected to that port. Is
> it a bug in Cygwin?

That's not a bug: a daemon can then open a port and detect whenever you
plug something and switch it on.

Samuel

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Serial port using USB adaptor

2008-03-01 Thread Samuel Thibault
hce, le Sat 01 Mar 2008 20:20:21 +1100, a écrit :
> One more thing, if a serial port is not connected by a serial cable,
> it can still open a serila port without errors. That was very stange
> to everybody when a problem printed out "Open Serial Port /dev/com1
> success", but actually there was no cable connected to that port. Is
> it a bug in Cygwin?

That's not a bug: a daemon can then open a port and detect whenever you
plug something and switch it on.

Samuel

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Serial port using USB adaptor

2008-03-01 Thread hce
On 2/29/08, Corinna Vinschen <[EMAIL PROTECTED]> wrote:
> On Feb 29 22:20, hce wrote:
>  > On 2/29/08, Corinna Vinschen <[EMAIL PROTECTED]> wrote:
>
> > > /dev/ttyUSB0 works?!?  It's no device name recognized by Cygwin, so
>  > >  I assume you created a file on the disk called /dev/ttyUSB0 when
>  > >  using it.
>  >
>  > It was copied from Linux.
>
>
> Yeah, I assumed that much.  As I said, that's not a device name
>  Cygwin can do anything useful with.
>
>
>  > >  My knowledge about serial I/O is rather clumsy, but isn't there a
>  > >  virtual COM port attached, or can't you attach a virtual COM port to
>  > >  your USB I/O?  AFAIK, you should find something like, say, COM9, which
>  > >  would be available as /dev/com9 or /dev/ttyS8.
>  >
>  > My knowledge to Window machine is also limited. So, I should open
>  > /dev/com9 or /dev/ttyS8 regardless it is connected to a serial cable
>  > or a USB serial adaptor. I don't have the Window machine at home, I'll
>  > try next day.
>
>
> I didn't say you should open /dev/ttyS8.  This was just an example.  You
>  first have to find out (or set?) the number of the virtual COM port.
>  For all I know it could be COM5 or COM12 or whatever.  The important
>  part is that, after you *know* the number X, you can use /dev/comX or
>  /dev/tty[X-1] to access this serial port.  Just don't access it using
>  the Windows name, COMx or \\.\COMx, because then you will not get any
>  POSIX serial I/O support from Cygwin.

Thanks  Corinna, it works under /dev/comx. One more thing, if a serial
port is not connected by a serial cable, it can still open a serila
port without errors. That was very stange to everybody when a problem
printed out "Open Serial Port /dev/com1 success", but actually there
was no cable connected to that port. Is it a bug in Cygwin?

Thank you.

Kind Regards,

Jim

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Serial port using USB adaptor

2008-02-29 Thread Corinna Vinschen
On Feb 29 22:20, hce wrote:
> On 2/29/08, Corinna Vinschen <[EMAIL PROTECTED]> wrote:
> > /dev/ttyUSB0 works?!?  It's no device name recognized by Cygwin, so
> >  I assume you created a file on the disk called /dev/ttyUSB0 when
> >  using it.
> 
> It was copied from Linux.

Yeah, I assumed that much.  As I said, that's not a device name
Cygwin can do anything useful with.

> >  My knowledge about serial I/O is rather clumsy, but isn't there a
> >  virtual COM port attached, or can't you attach a virtual COM port to
> >  your USB I/O?  AFAIK, you should find something like, say, COM9, which
> >  would be available as /dev/com9 or /dev/ttyS8.
> 
> My knowledge to Window machine is also limited. So, I should open
> /dev/com9 or /dev/ttyS8 regardless it is connected to a serial cable
> or a USB serial adaptor. I don't have the Window machine at home, I'll
> try next day.

I didn't say you should open /dev/ttyS8.  This was just an example.  You
first have to find out (or set?) the number of the virtual COM port.
For all I know it could be COM5 or COM12 or whatever.  The important
part is that, after you *know* the number X, you can use /dev/comX or
/dev/tty[X-1] to access this serial port.  Just don't access it using
the Windows name, COMx or \\.\COMx, because then you will not get any
POSIX serial I/O support from Cygwin.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Serial port using USB adaptor

2008-02-29 Thread hce
On 2/29/08, Corinna Vinschen <[EMAIL PROTECTED]> wrote:
> On Feb 29 12:43, hce wrote:
>  > Hi,
>  >
>  > I  have a linux serial port problem compiled by Cygwin on window, it
>  > runs fine if it connects a 9-pin serial cable and the device name is
>  > /dev/ttyS0 (it does not work with com1, I have to translate it to
>  > /dev/ttyS0). The problem is when I run the program in a PC without a
>  > physical 9-pin serial port on hardware:
>  >
>  > (1) If there is no USB Serial adaptor connected, it still opens
>  > /dev/ttyS0 without any errors. Then, it sends data to that port, and
>  > timeout (does not work).
>  >
>  > (2) If I plug a USB-Serial adaptor and change the device name to
>  > /dev/ttyUSB0, it opens that port witout problem but cannot connect to
>  > the serial device.
>
>
> /dev/ttyUSB0 works?!?  It's no device name recognized by Cygwin, so
>  I assume you created a file on the disk called /dev/ttyUSB0 when
>  using it.

It was copied from Linux.

>  My knowledge about serial I/O is rather clumsy, but isn't there a
>  virtual COM port attached, or can't you attach a virtual COM port to
>  your USB I/O?  AFAIK, you should find something like, say, COM9, which
>  would be available as /dev/com9 or /dev/ttyS8.

My knowledge to Window machine is also limited. So, I should open
/dev/com9 or /dev/ttyS8 regardless it is connected to a serial cable
or a USB serial adaptor. I don't have the Window machine at home, I'll
try next day.

Thank you Corinna.

Jim

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Serial port using USB adaptor

2008-02-29 Thread Corinna Vinschen
On Feb 29 12:43, hce wrote:
> Hi,
> 
> I  have a linux serial port problem compiled by Cygwin on window, it
> runs fine if it connects a 9-pin serial cable and the device name is
> /dev/ttyS0 (it does not work with com1, I have to translate it to
> /dev/ttyS0). The problem is when I run the program in a PC without a
> physical 9-pin serial port on hardware:
> 
> (1) If there is no USB Serial adaptor connected, it still opens
> /dev/ttyS0 without any errors. Then, it sends data to that port, and
> timeout (does not work).
> 
> (2) If I plug a USB-Serial adaptor and change the device name to
> /dev/ttyUSB0, it opens that port witout problem but cannot connect to
> the serial device.

/dev/ttyUSB0 works?!?  It's no device name recognized by Cygwin, so
I assume you created a file on the disk called /dev/ttyUSB0 when
using it.

My knowledge about serial I/O is rather clumsy, but isn't there a
virtual COM port attached, or can't you attach a virtual COM port to
your USB I/O?  AFAIK, you should find something like, say, COM9, which
would be available as /dev/com9 or /dev/ttyS8.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Serial port using USB adaptor

2008-02-28 Thread hce
Hi,

I  have a linux serial port problem compiled by Cygwin on window, it
runs fine if it connects a 9-pin serial cable and the device name is
/dev/ttyS0 (it does not work with com1, I have to translate it to
/dev/ttyS0). The problem is when I run the program in a PC without a
physical 9-pin serial port on hardware:

(1) If there is no USB Serial adaptor connected, it still opens
/dev/ttyS0 without any errors. Then, it sends data to that port, and
timeout (does not work).

(2) If I plug a USB-Serial adaptor and change the device name to
/dev/ttyUSB0, it opens that port witout problem but cannot connect to
the serial device.

Any advice please.

Thank you.

Kind Regards,

Jim

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/