Difference between revisions of "Install serial port"

From xPL
Jump to: navigation, search
(Serial port device)
Line 28: Line 28:
 
= Serial port device =
 
= Serial port device =
  
Download the serial port xPL device.
+
Download the [http://www.dspc.ch/xPL/Downloads/xpl-serial_port.pl serial port xPL device].

Revision as of 16:49, 16 March 2014

Many devices are controlled over an RS-232 serial port.

CPAN serial port module

The xPL serial port device bases on the Perl CPAN Device::SerialPort module.

Open a terminal and login as root.

Update CPAN:

perl -MCPAN -e shell
  > install LWP
  > reload LWP
  > install CPAN
  > reload CPAN
  > install YAML
  > q

Check if the serial port driver is already installed:

perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' 2> /dev/null | grep -i serial

Install the serial port driver:

perl -MCPAN -e "install 'Device::SerialPort'"

Alternatively, on Ubuntu:

apt-get install libdevice-serialport-perl

Serial port device

Download the serial port xPL device.