Difference between revisions of "Install serial port"

From xPL
Jump to: navigation, search
Line 3: Line 3:
 
= CPAN serial port module =
 
= CPAN serial port module =
  
The xPL serial port client bases on the [http://www.cpan.org Perl CPAN]
+
The xPL serial port device bases on the [http://www.cpan.org Perl CPAN]
 
[http://search.cpan.org/~cook/Device-SerialPort-1.04/SerialPort.pm Device::SerialPort] module.
 
[http://search.cpan.org/~cook/Device-SerialPort-1.04/SerialPort.pm Device::SerialPort] module.
  
Line 26: Line 26:
 
  apt-get install libdevice-serialport-perl
 
  apt-get install libdevice-serialport-perl
  
= Serial port client =
+
= Serial port device =
  
Download the serial port xPL client.
+
Download the serial port xPL device.

Revision as of 16:36, 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.