SIDEBAR
»
S
I
D
E
B
A
R
«
Connect to Serial Port Using Perl

This is a simple example of how to control a serial port using perl in linux.
For WIN32 systems please check out the Win32::Serial module.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use Device::SerialPort;

my $port = Device::SerialPort->new("/dev/ttyUSB0");
$port->databits(8);
$port->baudrate(19200);
$port->parity("none");
$port->stopbits(1);

while(1) {
  my $byte=$port->read(1);
  print "$byte";
}

7 Responses  
  • pixel writes:
    May 7th, 201213:01at

    Sorry Jaynail I have not personally used the zwave controller in my projects so I don’t have much advise to give in relation to zwave.

  • Jaynail writes:
    April 30th, 201203:43at

    Hi all

    Need help,

    Did you experience using zwave controller in linux host? How did you manage the data?


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


2 + = eleven