Re: [nottingham] Serial port data acquisition in Perl

From: Matthew Sackman (matthew@sackman.co.uk)
Date: Mon 14 Jan 2002 - 19:57:24 GMT


On Mon, Jan 14, 2002 at 07:03:17PM +0000, Tom Bird wrote:
> On Mon, 14 Jan 2002, Graeme Fowler wrote:
>
> > I'm trying to write something to dump the data off of my dive computer,
> > but I'm buggered if I can make something read the serial interface :(
> >
> > Simple answers on a postcard, please!
>
> This is probably ugly, evil and just totally wrong, but when I needed to
> send data to the serial port to control the little LCD screen thing I
> acquired, I just used /dev/ttyS0 like a file and shoved the data into
> that.
>
> It worked...

I can't see why that's necessarily so wrong - all communication is
via 'files' in *nix so why should doing that be so wrong?

I've not looked through it, but quick search reveals the .deb
libdevice-serialport-perl:
libdevice-serialport-perl - Perl module for interacting with serial ports.

This is a POSIX-based version of the Win32::Serialport module ported by Joe
Doss for the MisterHouse Home Automation Package from Version 0.08 of the
Win32 module. He replaced calls to the Win32 API with similar functions
implemented using POSIX calls. While most of the testing has occurred on
linux, the package should work on other POSIX-compliant Operating Systems.

Not sure if this is what you want or not. If you find it on packages.debian.org
then there should be a link either to the home page or to the source
file so you should be able to use it. It's probably on CPAN too...

HTH,

Matthew

-- 

Matthew Sackman Nottingham England

BOFH Excuse Board: I'd love to help you -- it's just that the Boss won't let me near the computer. -------------------------------------------------------------------- http://www.lug.org.uk http://www.linuxportal.co.uk http://www.linuxjob.co.uk http://www.linuxshop.co.uk --------------------------------------------------------------------



This archive was generated by hypermail 2.1.3 : Mon 14 Jan 2002 - 19:57:46 GMT