And it is always the same output:use Fcntl qw/:DEFAULT/; use IO::Termios (); use IO::Stty (); sysopen my $fh, '/dev/ttyUSB0', O_RDWR or die "sysopen: $!"; my $handle = IO::Termios->new($fh) or die "IO::Termios->new: $!"; $handle->set_mode('300,7,e,1'); IO::Stty::stty($handle, qw/ raw -parodd cs7 -cstopb parenb -ixoff -crt +scts -hupcl -ixon -opost -onlcr -isig -icanon -iexten -echo -echoe -e +choctl -echoke/); my $raw = "\x2F\x3F\x21\x0D\x0A"; $handle->syswrite($raw) == length($raw) or die "syswrite"; my $raw = "\x06\x30\x30\x30\x0D\x0A"; $handle->syswrite($raw) == length($raw) or die "syswrite"; for (1..300) { my $toread = 1; $handle->sysread(my $in, $toread) == $toread or die "sysread"; print $in; } $handle->close;
Thats all - thats not, what I need/?! 000 /LOG4LK13BD202015
2019-05-28 Athanasius added code tags
In reply to Re^2: r/w attached infrared head on /dev/ttyUSB0
by stoerti
in thread r/w attached infrared head on /dev/ttyUSB0
by stoerti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |