mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
Baudrate setting also sets "sanity" bits (was needed by echo on /dev/ttyACM0).
git-svn-id: https://svn.fhem.de/fhem/trunk@691 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
66132d93ff
commit
8945bc20fd
@ -952,7 +952,7 @@ CUL_OpenDev($$)
|
||||
delete($readyfnlist{"$name.$dev"});
|
||||
$selectlist{"$name.$dev"} = $hash;
|
||||
|
||||
} else { # USB Device
|
||||
} else { # USB/Serial device
|
||||
|
||||
my $baudrate;
|
||||
($dev, $baudrate) = split("@", $dev);
|
||||
@ -989,8 +989,28 @@ CUL_OpenDev($$)
|
||||
$po->parity('none');
|
||||
$po->stopbits(1);
|
||||
$po->handshake('none');
|
||||
|
||||
# This part is for some Linux kernel versions whih has strange default
|
||||
# settings. Device::SerialPort is nice: if the flag is not defined for your
|
||||
# OS then it will be ignored.
|
||||
$po->stty_icanon(0);
|
||||
#$po->stty_parmrk(0); # The debian standard install does not have it
|
||||
$po->stty_icrnl(0);
|
||||
$po->stty_echoe(0);
|
||||
$po->stty_echok(0);
|
||||
$po->stty_echoctl(0);
|
||||
|
||||
# Needed for some strange distros
|
||||
$po->stty_echo(0);
|
||||
$po->stty_icanon(0);
|
||||
$po->stty_isig(0);
|
||||
$po->stty_opost(0);
|
||||
$po->stty_icrnl(0);
|
||||
}
|
||||
|
||||
$po->write_settings;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($reopen) {
|
||||
|
Loading…
Reference in New Issue
Block a user