Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Adding Linux device with Creator fails

Adding Linux device with Creator fails

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 3 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HannoBlackert
    wrote on 5 Jun 2024, 09:37 last edited by
    #1

    For long time I enjoyed remote programming Linux devices (RaspberryPi) with QtCreator. Recently adding and testing such devices by "Preferences / Devices" fails the final tests. Keys are transferred to the device successfully and when coming to "Test" I get the message

    "Connecting to device...
    Basic connectivity test failed, device is considered unusable.
    Device test failed."

    When starting QtCreator from the terminal, I see there more detailed information:

    "qtc.utils.deviceshell: Unexpected output while installing device shell script: "mkfifo: der FIFO '/tmp/tmp.XOnICRT6yc' cannot be created"
    qtc.remotelinux.device: Failed to start shell for: "pi@heizung" , "Failed to install shell script: Failed to install shell script: : No permission"

    Calling the creator as admin yields the same error.
    However, executing "ssh pi@heizung" from the terminal works fine.

    My environment:
    QtCreator 13.01 based on Qt 6.6.3
    Laptop with KDE Plasma 6 / Ubuntu 22.04
    Using Qt 6.7.1 yields the same error

    Help greatly appreciated!
    Hanno

    1 Reply Last reply
    1
    • M Offline
      M Offline
      Morix Dev
      wrote on 11 Jun 2024, 10:04 last edited by
      #2

      Hi guys. The same here. I am not using Raspberry but a custom i.MX6-based device... and the result is the same.

      I can create the remote device, deploy the keys on it, opening a remote shell to the device... everything seems fine, but when I click on "Test" then QtCreator replies that "Basic connectivity test failed, device is considered unusable".

      Launching QtCreator from command line, I can read some additional info:
      qtc.remotelinux.device: Failed to start shell for "root@192.168.1.1", "Failed to install shell script: Command "base64" was not found.\n"

      I've already double-checked that base64 utility is installed and working on my PC (actually version 9.4 from GNU coreutils package).

      I am using QtCreator 13.0.2 on Kubuntu 24.04 LTS, targeting Qt 5.3.2.

      Please give me some advices, since QtCreator is pretty unuseful if I cannot deploy to target device...

      Thanks!

      /Morix

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Morix Dev
        wrote on 11 Jun 2024, 12:59 last edited by
        #3

        UPDATE: I just realized that base64 must be installed on target device, and not on host PC... so I arrange to cross-compile "base64", and also "install" and "rsync" which I then discovered were missing too, deployed them to the target device and now I am able to successfully pass connection tests gracefully and I am able to deploy & run my application on my target device.

        But now I have another problem: everything works fine if, in QtCreator's Devices configuration, I select "Default" as the authentication type. If I select "Specific key" and I generate a key pair (deploying the public key to the target device) then connection tests are failed again...

        This time the message on console is:

        SOFT ASSERT: "state() == QProcess::Running" in /home/qt/work/build/qt-creator/src/libs/utils/process.cpp:1608
        qtc.remotelinux.device: Failed to start shell for: "root@192.168.1.1", "Failed to install shell script: Timeout while trying to check for cat.\n"
        

        Any ideas?

        /Morix

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cristian-adam
          wrote on 11 Jun 2024, 14:25 last edited by
          #4

          You could have a look into Qt Creator logs via Tools > Debug Qt Creator > Show Logs... and hopefully you could find out what's going on.

          1 Reply Last reply
          1
          • M Offline
            M Offline
            Morix Dev
            wrote on 11 Jun 2024, 15:13 last edited by
            #5

            Great hint!
            Doing what you've suggested I was able to understand the steps performed by QtCreator for connecting to the device and I was able to reproduce the issue, which it turned out to be due to the fact that my target device (which is quite "old") only supports SHA-1 as hashing algorithm to be used by SSH, but SHA-1 was deprecated on my desktop machine and so the SSH client on my desktop was not able to negotiate a mutual authentication scheme with the target device.

            I fixed the problem re-enabling SHA-1 in my desktop's SSH configuration file, simply by adding the directive:

            PubkeyAcceptedKeyTypes +ssh-rsa
            

            at the end of my desktop's /etc/ssh/ssh_config.

            Thanks again! TOP!

            /Morix

            1 Reply Last reply
            1
            • H Offline
              H Offline
              HannoBlackert
              wrote on 12 Jun 2024, 09:30 last edited by
              #6

              Helpful hint by Morix Dev:
              The error message in QtCreator indicating missing rights to install shell script is related to the target device!
              The script is intended to be installed in folder "/tmp". So I executed "sudo chown pi /tmp" - and the device test succeded!
              Since this change of rights is not permanent, I added this "chown" command to /etc/rc.local to be executed at boot end and it worked.
              Many thanks !!!

              1 Reply Last reply
              1
              • C Offline
                C Offline
                cristian-adam
                wrote on 12 Jun 2024, 17:44 last edited by cristian-adam 6 Dec 2024, 17:44
                #7

                Dont' forget to mark the thread as solved.

                1 Reply Last reply
                0

                1/7

                5 Jun 2024, 09:37

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved