Re: [nottingham] Serial port data acquisition in Perl

From: Graeme Fowler (graeme@graemef.net)
Date: Mon 14 Jan 2002 - 22:24:51 GMT


OK, thanks for the discussion so far.

I will now re-explain :)

I have permission to read/write from the serial port; I am not running the
script as root.

The filehandle opens exactly as expected. I can crash the dive computer
interface by writing random garbage to the serial port if I reverse the
direction of the filehandle (it's not very resilient, and my computer is
not one I can calibrate so the input is invalid anyway). This, however, is
Not Good as it will eventually lead me to wipe the stored dives I have on
there, and that's not something I want to do too often.

I can happily control the serial interface in terms of baud rate, flow
control, parity et al. I can raise and lower the DTR and CTS flags (lines)
when I need to. I can send the appropriate ACK or NAK signal as
required. I can do all of this from within Perl using POSIX::Termios or
the Win32 serial port module, or within a shell environment (more
limited).

I cannot, however, read any data - at all - back from the device in
question. I know the cable works, because I ran the whole unit on a W2K
platform earlier today and it worked a treat.

The problem I seem to have is actually reading the data - I know it's
there, I just can't seem to get it into a usable state!

If anyone has a handy LED readout serial tester I could borrow, now that
would be useful...

Ta anyway

Graeme

--------------------------------------------------------------------
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 - 22:28:28 GMT