Hello Community,

i'm trying to transfer a binary file or file from my PC(ubuntu OS) to an embedded system raspberry(raspbian OS) over serial port. Physically, my PC is connected to my raspberry through FTDI Chip TTL-232R-Rpi Kabel(USB-to-UART).
I use an own application on my pc developed over qtcreator with QSerialPort library to configure and open the device /dev/ttyUSB0(COM3 for Windows OS) of my pc.
Qt Code:
  1. m_serial = new QSerialPort(this)
  2. m_serial->setPortName("/dev/ttyUSB0)
  3. m_serial->setBaudRate(QSerialPort::Baud115200);
  4. m_serial->setDataBits(QSerialPort::Data8);
  5. m_serial->setParity(QSerialPort::NoParity);
  6. m_serial->setStopBits(QSerialPort::OneStop);
  7. m_serial->setFlowControl(QSerialPort::NoFlowControl);
  8. m_serial->open(QIODevice::ReadWrite);
To copy to clipboard, switch view to plain text mode 

All work fine. I can connect the pc to the raspberry with login. The serial connection currently is working but this is controlled by the Raspberry console like a remote connection to Raspberry and goes directly to console and login(raspberry).
On my PC, being connected on the raspberry console i run the following code "dd bs=1 count=138333 | base64 -d > myfile_to_receive \r"
Qt Code:
  1. void MainWindow::on_btnRecv_clicked()
  2. {
  3. m_command = "dd bs=1 count=138333 | base64 -d > test_32_test \r";
  4. m_serial->write(m_command.toLocal8Bit());
  5. }
To copy to clipboard, switch view to plain text mode 

to wait and receive via serial port all binary data from pc, it works fine.
Unfortunately, when i send data from my pc using the same application but via QProcess or system with the following code "cat file_to_send > /dev/ttyUSB0"
Qt Code:
  1. system("cat file_to_send > /dev/ttyUSB0");
To copy to clipboard, switch view to plain text mode 
i cannot send my file and i get the message "cannot create /dev/ttyUSB0: Device or resource busy". I'm trying to remove the file LCK..ttyUSB0 created by QSerialport but nothing works well(Sending).
Can somebody help me, please?
Thank you in advance

N.B: transfer binary file over serial port without protocol like kermit, or zmodem or putty, etc.... as also no ethernet or ssh connection