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
In reply to copy is not happening using by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |