[Melbourne-pm] Driving a serial command line device with Perl
Craig Sanders
cas at taz.net.au
Mon Oct 9 06:06:25 PDT 2006
On Wed, Oct 04, 2006 at 12:59:50PM +1000, Daniel Pittman wrote:
> G'day. I need to build a script wrapper around a command line device,
> accessed via a serial port.
>
> I know a bunch of ways to do this, from driving an external cu with
> Expect, or implementing all that code myself with sysread and syswrite.
no need to do that, there is a CPAN module called 'Expect' which
re-implements Expect in perl.
> All I really need is to connect to the device, write a few commands out
> and read back the responses. All pretty trivial, no complex buffering
> needed, and all should be pretty easy to manage.
>
> So, any suggestions on what the easy way to do this is?
Expect.pm
craig
--
craig sanders <cas at taz.net.au> (part time cyborg)
More information about the Melbourne-pm
mailing list