in reply to Re: 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 </code>
  • Comment on Re^2: how to connect two DUT console in script

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

      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.