[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Serial interface



I'm trying to port some Linux box code to a Mac.  The code is used to
program a robot through a serial port.

MacPerl 5.0x syntax checks OK using -w and "use strict".  However, the code
doesn't run and halts with the error messages is:

# opening /dev/cua1 for input: error #002.
File 'Data:MacPerl f:talkrcx1.1x'; Line 29

and I expect that, at least I need to change the definition of the port.
Line 29 is:

open("portfh","+<$port") || die "opening $port for input: $!";

The other code dealing with the port are (extracted out of sequence):

$port = "/dev/cua1";
open("portfh","+<$port") || die "opening $port for input: $!";
system("stty 2400 parodd parenb cs8 -cstopb raw < $port");

Pointers as to how to get this code working?

Thanks, Garry



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch