in reply to Re^2: how to connect two DUT console in script
in thread how to connect two DUT console in script

use Device::SerialPort; use Data::Dumper qw(Dumper); my $port = Device::SerialPort->new("/dev/ttyUSB3"); my $port1 = Device::SerialPort->new("/dev/ttyUSB2"); $port->baudrate(115200); # Configure this to match your device $port->databits(8); $port->parity("none"); $port->stopbits(1); $port->lookclear; $port->write("date\n"); $port1->write("date\n"); === not working need help

Replies are listed 'Best First'.
Re^4: how to connect two DUT console in script
by Corion (Patriarch) on Jun 28, 2018 at 08:51 UTC

    You did not configure $port1 in the same way you configured $port.

    Maybe when you treat $port1 the same way, it will act the same way?

Re^4: how to connect two DUT console in script
by marto (Cardinal) on Jun 28, 2018 at 08:52 UTC

    I notice you configure $port e.g. $port->baudrate(115200);, but not $port1.