Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use Device::SerialPort; use Data::Dumper qw(Dumper); my $port = Device::SerialPort->new("/dev/ttyUSB3"); $port->baudrate(115200); # Configure this to match your device $port-> +databits(8); $port->parity("none"); $port->stopbits(1); $port->lookclear; for($i=1;$i<=100;$i++){ $port->write("\n^^^^^^^^^^^ rebooted $i times ++++++++^^^^^^^^^^^ \n") +; $port->write("cd /tmp \n"); $port->write("cp /mnt/usb/9798E1C89698/Disc-1/image.img . \n"); }
I am trying to copy image from usb to tmp location but 2 out of 10 times it happens dont know what is causing and how to fix this
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: copy is not happening using
by Corion (Patriarch) on Jun 28, 2018 at 09:17 UTC | |
|
Re: copy is not happening using
by haukex (Archbishop) on Jun 28, 2018 at 21:43 UTC |