[nSLUG] /dev/ttyS0: open from Perl ??

Mike mspencer at tallships.ca
Wed Mar 10 03:52:43 AST 2004


I'm trying to get a Kodak DC40 talking to my PC.  To do this, I have
to converse with the serial port (not USB).  A Perl script called
kdcpi should do this but doesn't.

The problem seems to be that an attempt to open /dev/ttyS0 hangs.
That is, a call to open or sysopen (or to IO::File->new which uses
either open or sysopen) never returns.

If I disconnect the camera and plug my modem back in, an attempt to
open /dev/ttyS0 turns on the the DTR light but nothing further
happens.  The [sys]open call hangs and never returns. 

   /dev/ttyS0 works with pppd and minicom
   /dev/ttyS0 is rw-rw-rw

The kdcpi script uses IO::File->new($tty,$O_RDWR) and thus sysopen.
It's said to work.  Looking at the C code for minicom and the
Serial-Programming-HOWTO, I don't see any special incantations needed
to do an open on /dev/ttyS0.

What am I missing?

Feeling stupid,
- Mike

-- 
Michael Spencer                  Nova Scotia, Canada       .~. 
                                                           /V\ 
mspencer at tallships.ca                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^

-- 







More information about the nSLUG mailing list