Re: SerialPort error
- From: jt@xxxxxxxxxxx (Jens Thoms Toerring)
- Date: 13 Jul 2007 17:15:15 GMT
H.K. Kingston-Smith <HKK-S@xxxxxxxxx> wrote:
I have a perl script that complains about not being able to find
Device/SerialPort.pm. I therefore tried to get it from the CPAN
repository; at the perl -MCPAN shell command line I typed
install Device::SerialPort
The code is downloaded and apparently built successfully, but on running
the tests I get the following:
running make test
PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01timing....ok
t/test1.......ok 1/0# Using '/dev/ttyS1' as test
port.
can't getattr: Input/output error at t/test1.t line 121
t/test1.......NOK
21
# Failed test in t/test1.t at line 121.
7: could not open port '/dev/ttyS1'. Are permissions correct?
# Looks like you failed 1 test of 21.
How do I get around this? I was attempting to install this module
as superuser; I don't think that permissions are an issue. Also, why is
it attempting to mess with /dev/ttyS1? I have just one serial port, which
is likely to be /dev/ttyS0.
See the README file for the module:
http://search.cpan.org/src/COOK/Device-SerialPort-1.002001/README
Run 'perl Makefile.PL' followed by 'make'. This will create install
files and directories. Run 'make test' with nothing connected to
"/dev/ttyS1". This will run the tests and create a configuration
file. You can specify a different port to test via
'perl Makefile.PL TESTPORT=<DEVICE>'. Makefile.PL creates
"t/DefaultPort.pm". You can also specify an alternate port with the
Shell Variable "Makefile_Test_Port".
I don't know if it was a wise decision by the author to use
/dev/ttyS1 for testing, but that's the way it is. I don't know
if it's possible to set a different test port for the CPAN
install, the simplest approach may be to download the module
from
http://search.cpan.org/src/COOK/Device-SerialPort-1.002001/SerialPort.pm
and then, after unpacking, do
perl Makefile.PL TESTPORT=/dev/ttyS0
make
make test
make install
Of course, do the last step only if the tests don't fail;-)
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@xxxxxxxxxxx
\__________________________ http://toerring.de
.
- References:
- SerialPort error
- From: H.K. Kingston-Smith
- SerialPort error
- Prev by Date: Please help on win32::serialport
- Next by Date: Re: perl modules installation
- Previous by thread: SerialPort error
- Next by thread: www::search
- Index(es):
Relevant Pages
|
|