Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8110909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:55:40+00:00 2026-06-06T01:55:40+00:00

Background of project -> I have to upgrade the Linux embedded system remotely. This

  • 0

Background of project -> I have to upgrade the Linux embedded system remotely. This requires to transfer the tar ball file from Windows Qt application to Linux box connected via Ethernet cable. The Linux box has fixed IP address.

What I have done so far -> Being complete novice in Qt, I have created a dialog box to browse the file and check tar ball file.

Issues -> Now I want that when I click another button, say Upgrade, it should transfer the files from Windows to Linux box (that has fixed IP address) and execute the bash script which has code how to upgrade different files.

May you guys please throw some light how would I send files from Windows to Linux box. I have looked at FTP client of Qt and I guess it downloads the file instead of transferring it.

Thanks and regards,
Sam

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:55:42+00:00Added an answer on June 6, 2026 at 1:55 am

    1) My batch script say upgrade.bat accepts 2 parameters like ip address , upgrade tar ball
    then using putty.exe it transfers the file to linux machine connected via ethernet cable.
    example in bat script

    pscp -pw “blabla” “%TARGET_UPDATE_FILE%”
    user@”%TARGET_IP%”:”%BASE_DIR%”/

    where target_update_file = tar ball file accept from Qt and target ip = ip address received as parameter to bat file from qt .

    Now on qt , in upgrade button code

    void Qt_test::ReadOut()     
    {       
         QProcess *processInfo = dynamic_cast< QProcess* >( sender() );
    
       if( processInfo )
         {
           ui->upgrade_info->append( processInfo->readAllStandardOutput() );
         }        
     }    
    
    void Qt_test::ReadError()
    {
         QProcess *processInfo = dynamic_cast< QProcess* >( sender() );
    
        if( processInfo )
       {
           ui->upgrade_info->append( processInfo->readAllStandardError() );
       }
     }
    
    void Qt_test::on_file_browse_clicked()
    {
         ui->selected_file->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ),
                                                            "/home",
                                                            tr( "Upgrade file ( *.tar.gz )"     ) ) );
     }
    
    void  Qt_test::on_file_upgrade_clicked()
     {
            QFileInfo upgradeFileInfo( ui->selected_file->text() );
            if( !upgradeFileInfo.exists() )
           {
                 QMessageBox::information( this, tr( "Information" ),
                                 tr( "Unable to find file for upgrading!" ) );
                return;
           }     
    
        QString batchPath= QDir::currentPath() + "\\testUpgrade.bat" ;
        QFileInfo batchFile( batchPath ) ;
        if( !batchFile.exists() )
        {
                 QMessageBox::information( this, tr( "Information" ),
                                 tr("Failed to find the upgrade batch file....... ") ) ;
             return;
         }
    
        //Check if cmd.exe is present in Clients system and is located at correct path
           QFileInfo cmdFile( "C:\\Windows\\system32\\cmd.exe");
         if( !cmdFile.exists() )
          {
               QMessageBox::information( this, tr( "Information" ),
                                 tr("Failed to find the cmd.exe ... Check cmd.exe is   installed and is in  C:\\Windows\\system32\\ !") ) ;
              return;
          }
    
         QFileInfo puttyFile( "C:\\Windows\\system32\\putty.exe");
         if( !puttyFile.exists() )
         {
               QMessageBox::information( this, tr( "Information" ),
                                  tr("Failed to find the putty.exe ... Check putty.exe(ideally version 0.62.0.0) is installed and is in  C:\\Windows\\system32\\ !") ) ;
              return;
         }
    
          QFileInfo plinkFile( "C:\\Windows\\system32\\plink.exe");
         if( !plinkFile.exists() )
         {
              QMessageBox::information( this, tr( "Information" ),
                                  tr("Failed to find the plink.exe ... Check plink.exe(ideally version 0.62.0.0) is installed and is in  C:\\Windows\\system32\\ !") ) ;
              return;
         }
    
        QString upgradeFile =   upgradeFileInfo.absoluteFilePath();
       QString ipAddress   =   ui->selected_ip->text();
        qDebug() << " checksum valu is " <<checkSum.count() ;
        QStringList arguments ;
    
        arguments << " /c" << batchFile.absoluteFilePath()<< upgradeFile << ipAddress ;
       // copying update
       QProcess *processUpgrade = new QProcess( this );
       if( processUpgrade )
        {   std::cout <<" starting to upgrade " << std::endl ;
    
           processUpgrade->setEnvironment( QProcess::systemEnvironment() )  ;
           processUpgrade->setProcessChannelMode( QProcess::MergedChannels ) ;
    
            processUpgrade->start( cmdFile.absoluteFilePath(), arguments ) ;
            processUpgrade->waitForStarted() ;
            connect( processUpgrade, SIGNAL( readyReadStandardOutput() ), this, SLOT( ReadOut() ) ) ;
              connect( processUpgrade, SIGNAL( readyReadStandardError()  ), this, SLOT( ReadErr() ) ) ;
      }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am evaluating Embedded Linux GUI toolkits for an upcoming project and have put
My background is Linux and traditional makefiles. I have a project where the makefile
Background: I'm creating a dashboard as a project and I have a query that
Background : I have a asp.net webapplication project that should contain a public and
background:Me and my coworkers are working on asp.net mvc project ... we have a
Background: I am developing a largish project using at Atmel AVR atmega2560. This project
BACKGROUND I'm doing an interactive art project for school. PROCESS For this project the
The background to this problem is that I'm doing a computing project which involves
Background : For an university project I have to use PHP5 to create a
Background: We have a project with many modules. We're using EntityFramework 4.2 with FluentAPI

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.