in reply to how to connect two DUT console in script

its not happening

That's an insufficient description of the problem, I'm afraid. You've shown the code which works, but not the code which doesn't. Nor have you explained in which way it isn't "happening".

Try the Basic Debugging Checklist, perhaps?

  • Comment on Re: how to connect two DUT console in script

Replies are listed 'Best First'.
Re^2: how to connect two DUT console in script
by Anonymous Monk on Jun 28, 2018 at 08:46 UTC
    <> 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 </code>
      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

        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?

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