NAME
Net::Appliance::Session::Transport::Serial
SYNOPSIS
$s = Net::Appliance::Session->new(
Host => 'hostname.example',
Transport => 'Serial',
);
$s->connect(
Name => $username, # required if logging in
Password => $password, # required if logging in
);
DESCRIPTION
This package sets up a new pseudo terminal, connected to a serial communication program running in a spawned process, which is then bound into Net::Telnet for IO purposes.
CONFIGURATION
This module hooks into Net::Appliance::Session via its connect() method. Parameters are supplied to connect() in a hash of named arguments.
Required Parameters
Name-
If log-in is enabled (i.e. you have not disabled this via
do_login()), and the remote host requests a username, then you must also supply a username in theNameparameter value. The username will be stored for possible later use bybegin_privileged(). Password-
If log-in is enabled (i.e. you have not disabled this via
do_login()) then you must also supply a password in thePasswordparameter value. The password will be stored for possible later use bybegin_privileged().
Optional Parameters
Parity-
You have a choice of
even,oddornonefor the parity used in serial communication. The default isnone, and override this by passing a value in theParitynamed parameter. Nostop-
You can control whether to use
XON/XOFFhandling for the serial communcation. The default is to disable this, so to enable it pass any False value in theNostopnamed parameter (yes, this is counter-intuitive, sorry). Line-
This named parameter is used to specify the local system device through which a serial connection is made. The default is
/dev/ttyS0and you can override that by passing an alternate value to theLinenamed parameter. Make sure you have write access to the device. Speed-
You can set the speed (or baud rate) of the serial line by passing a value to this named parameter. The default is to use a speed of
9600. Sleep-
After a connection is made to the device, one carriage return character is sent, and then this module looks to see whether there is a login or command prompt. If it doesn't see one after 10 seconds, it will time out and die.
Before the carriage return is sent you can request that the module pause, perhaps to allow your device to display boot messages or other notices. The default operation is not to sleep, so to override that pass an integer number to the
Sleepnamed parameter, which will be the number of seconds to wait before sending that carriage return. App-
You can override the default location of your
cuapplication binary by providing a value to this named parameter. This module expects that the binary is a version of Ian Lance Taylor'scuapplication.$s->connect( Name => $username, Password => $password, App => '/usr/local/bin/cu', );The default binary location is
/usr/bin/cu.
DEPENDENCIES
To be used, this module requires that your system have a working copy of Ian Lance Taylor's cu application installed.
AUTHOR
Oliver Gorwits <oliver.gorwits@oucs.ox.ac.uk>
COPYRIGHT & LICENSE
Copyright (c) The University of Oxford 2006. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA